package xiaoqi.springboot.boot.dto;

import javax.validation.constraints.AssertFalse;
import javax.validation.constraints.AssertTrue;

public class UserUpdateStatusDTO {

    /*分组01，要求状态为 true*/
    public interface  Group01{};
    /*分组02，要求状态必须2为 false*/
    public interface Group02{};

    @AssertTrue(message = "状态必须为 true", groups = Group01.class)
    @AssertFalse(message = "状态必须为 false", groups = Group02.class)
    private Boolean status;

    public Boolean getStatus() {
        return status;
    }

    public void setStatus(Boolean status) {
        this.status = status;
    }
}
